package blog.core.util;

public class DaoUtils {

	/**
	 * 根据类获取基本的查询字符串
	 *
	 * @param clazz
	 *            类的class属性
	 * @return 查询字符串
	 */
	public static <T> String getBasicHql(Class<T> clazz) {
		return "select t from " + getClassStr(clazz) + " as t where 1=1 ";
	}

	public static <T> String getClassStr(Class<T> clazz) {
		return clazz.getCanonicalName();
	}

}
